import React,{Component} from "react"
export  default  class Form extends Component{

 onHandleForm=(event)=>{
     event.preventDefault();
    const {input1 ,input2}=this;
    console.log(input1.value,input2.value);
 }
    render() {
    return(
        <form onSubmit={this.onHandleForm}>
            <input type={"text"} ref={c=> this.input1=c} placeholder={"账号"} />
            <input type={"text"} ref={c=> this.input2=c} placeholder={"密码"} />
    <button>提交</button>
        </form>

    )

    }
}
